home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7954 < prev    next >
Encoding:
Text File  |  1996-08-05  |  808 b   |  36 lines

  1. Newsgroups: comp.lang.c
  2. Path: netcom.com!raffelm
  3. From: raffelm@netcom.com (Matt Raffel)
  4. Subject: Re: Example using vfprintf
  5. Message-ID: <raffelmDnK2ww.39r@netcom.com>
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. X-Newsreader: TIN [version 1.2 PL1]
  8. References: <raffelmDnK19L.IH6@netcom.com>
  9. Date: Thu, 29 Feb 1996 21:12:31 GMT
  10. Sender: raffelm@netcom8.netcom.com
  11.  
  12.  
  13. void lprintf(char *pszFormat, ...)
  14. {
  15.    FILE *pstFile = NULL;
  16.    va_list pstMarker;
  17.  
  18.  
  19.    
  20.    va_start(pstMarker);
  21.    pstFile = fopen("llog.txt", "wt+");
  22.  
  23.    if (pstFile)
  24.    {
  25.       vfprintf(pstFile, pszFormat, pstMarker);
  26.       fclose(pstFile);
  27.    }
  28.    va_end(pstMarker);
  29.    
  30. }
  31.  
  32. -- 
  33. raffelm@netcom.com
  34. Web Page  ftp://ftp.netcom.com/ra/raffelm/isdhome.html
  35.           ftp://ftp.netcom.com/ra/raffelm/homeofmatt.html 
  36.